﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Globalization;
namespace _11.EnglishPronounce
{
    class englishPronounce
    {
        static void Main(string[] args)
        {
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
            Console.WriteLine("English pronounce.Write an integer number in the interval 0 ... 999");
            string number = Console.ReadLine();
            int num,desetici = 0,stotici = 0,edinici = 0,special = 0;
            if (int.TryParse(number, out num))
            {
                Console.WriteLine();
            }
            else
            {
                Console.WriteLine("This is not an integer.Try again later -- number = {0}",number);
            }
            if (num > 100)
            {
                edinici = num % 10;
                desetici = (num % 100) - edinici;
                stotici = num - (desetici + edinici);
            }
            else if (num > 10)
            {
                edinici = (num % 10);
                desetici = num - edinici;
            }
            
            switch (stotici)
            {
                case 100: Console.Write("One hundred "); break;
                case 200: Console.Write("Two hundred "); break;
                case 300: Console.Write("Three hundred "); break;
                case 400: Console.Write("Four hundred "); break;
                case 500: Console.Write("Five hundred "); break;
                case 600: Console.Write("Six hundred "); break;
                case 700: Console.Write("Seven hundred "); break;
                case 800: Console.Write("Eight hundred "); break;
                case 900: Console.Write("Nine hundred "); break;
                default: Console.Write("Error!");
                    break;
            }
            switch (desetici)
            {
                case 10: Console.Write("Ten "); break;
                case 20: Console.Write("Twenty "); break;
                case 30: Console.Write("Thirty "); break;
                case 40: Console.Write("Forty "); break;
                case 50: Console.Write("Fifty "); break;
                case 60: Console.Write("Sixty "); break;
                case 70: Console.Write("Seventy "); break;
                case 80: Console.Write("Eighty "); break;
                case 90: Console.Write("Ninety "); break;
                default: Console.Write("Error! ");
                    break;
            }
            switch (edinici)
            {
                case 0: Console.Write("Zero \n"); break;
                case 1: Console.Write("One \n"); break;
                case 2: Console.Write("Two \n"); break;
                case 3: Console.Write("Three \n"); break;
                case 4: Console.Write("Four \n"); break;
                case 5: Console.Write("Five \n"); break;
                case 6: Console.Write("Six \n"); break;
                case 7: Console.Write("Seven \n"); break;
                case 8: Console.Write("Eight \n"); break;
                case 9: Console.Write("Nine \n"); break;
                default: Console.Write("Error!");
                    break;
            }
        }
    }
}
